<!-- base.html -->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>天气灾害应急管理系统</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
    <header>
        <h1><i class="fas fa-cloud-sun-rain"></i> 天气灾害应急管理系统</h1>
        <nav>
            {% if 'user_id' in session %}
                <div class="user-profile">
                    <i class="fas fa-user-circle"></i>
                    <span>{{ session['username'] }} ({{ session['role'] }})</span>
                </div>
                <a href="{{ url_for('logout') }}"><i class="fas fa-sign-out-alt"></i> 退出</a>
                {% if session['role'] == 'admin' %}
                    <a href="{{ url_for('admin_dashboard') }}"><i class="fas fa-tachometer-alt"></i> 管理员面板</a>
                {% elif session['role'] == 'rescuer' %}
                    <a href="{{ url_for('rescuer_dashboard') }}"><i class="fas fa-tachometer-alt"></i> 救援面板</a>
                {% else %}
                    <a href="{{ url_for('user_dashboard') }}"><i class="fas fa-tachometer-alt"></i> 用户面板</a>
                {% endif %}
            {% else %}
                <a href="{{ url_for('login') }}"><i class="fas fa-sign-in-alt"></i> 登录</a>
                <a href="{{ url_for('register') }}"><i class="fas fa-user-plus"></i> 注册</a>
            {% endif %}
            <a href="{{ url_for('index') }}"><i class="fas fa-home"></i> 首页</a>
        </nav>
    </header>
    <main>
        {% block content %}{% endblock %}
    </main>
    <footer>
        <p>&copy; 2025 天气灾害应急管理系统</p>
    </footer>
    <script src="{{ url_for('static', filename='js/script.js') }}"></script>
</body>
</html>